<!-- da dang nhap -> hien thi block thong tin nguoi dung -->
<?php $name_lang = field('name'); ?>
<?php if(isset($user_info) && !empty($user_info)) { ?>
  <div class="box_main">
    <div class="txt_r"><i><?=date('d/m/Y',time())?></i></div>
    <div class="menber_right mt10">
      <div class="img left"><a href="<?=PATH_URL_LANG.'users'?>"><img src="<?=LINK_AVATAR?>img_avarta.jpg" alt="" /></a></div>
      <div class="text right">
        <div class="name_menber"><?=lang('hi')?> <a href="<?=PATH_URL_LANG.'users'?>"><?php if(isset($user_info)) { if(!empty($user_info->lastname) ){ print($user_info->lastname);} else{ print($user_info->username);} } ?></a>,</div>
        <div class="mt5"><a href="<?=PATH_URL_LANG.'users'?>" class="btn_thanhvien"><?php if(isset($user_info->$name_lang)) { print $user_info->$name_lang; } ?></a></div>
      </div>
      <div class="clearAll"></div>
    </div>
    <div class="mt10"><img src="<?=PATH_URL?>static/images/img_list_menber.png" alt="" class="png" style="vertical-align:2px;" />&nbsp;&nbsp;<a href="<?=PATH_URL_LANG.'users'?>" class="cl_c5c5c5 fs12"><?=lang('user_info')?></a></div>
    <div class="mt5"><img src="<?=PATH_URL?>static/images/img_list_menber.png" alt="" class="png" style="vertical-align:2px;" />&nbsp;&nbsp;<a href="<?=PATH_URL_LANG.'users/logout'?>" class="cl_c5c5c5 fs12"><?=lang('logout')?></a></div>
  </div>
<?php } else { ?> <!-- chua dang nhap -> hien thi form dang nhap -->
  <div class="box_main">
    <form action="<?=PATH_URL_LANG.'users/login'?>" name="loginForm" id='loginForm' method='post'>
      <div><?=lang('your_name')?></div>
      <div class="input mt3"><input type="text" name="user" /></div>
      <div class="mt7"><?=lang('your_pass')?></div>
      <div class="input mt3"><input type="password" name="pass" /></div>
      <div class="mt13">&nbsp;<a href="javascript:void(0)"  onclick="reCaptcha()" style="vertical-align:9px;"><img src="<?=PATH_URL?>static/images/btn/btn_reset_check.png" alt="" class="png" /></a>&nbsp;<input class="text_check" type="text" name="" /></div>
      <div class="mt3">
        <div class="left mt8 fs12"><input type="checkbox" name="chk_remember" id='chk_remember' style="vertical-align:-1px;" />&nbsp;<?=lang('rememberme')?></div>
        <div class="right"><a href="javascript:void(0)" onclick='login()'><img src="<?=PATH_URL?>static/images/btn/btn_signin.png" alt="" class="png" /></a></div>
        <div class="clearAll"></div>
      </div>
      <div class="mt2"><a href="#" class="cl_c5c5c5 fs12">- <?=lang('forgot')?></a></div>
      <div class="mt5"><a href="#" class="cl_c5c5c5 fs12">- <?=lang('createanaccount')?></a></div>
    </form>
  </div>
<?php } ?>
